import { httpInstance } from '@/utils/request'

interface UpdatePersonnelAPIData {
  project_id: string
  personnel_ids: string
}

interface UpdatePersonnelAPIResData {
  code: number
  data: null
  msg: string
  time: string
}

export function updatePersonnelAPI(
  data: UpdatePersonnelAPIData,
  token: string,
) {
  return httpInstance.post<
    UpdatePersonnelAPIResData,
    UpdatePersonnelAPIData
  >(
    'api/Project/updatePersonnel',
    data,
    { headers: { token } },
  )
}
